<template>
  <div class="w-full h-full overflow-y-auto box-border p-[10px]">
    <template v-for="item in list">
      <van-tag
        @click="handleClickReply(item.Content)"
        class="mr-[6px] mb-[6px]"
        type="primary"
        size="large"
        >{{ item.Title }}</van-tag
      >
    </template>
  </div>
</template>
<script setup lang="ts">
import { reqReplyList } from "@/api/setting";

const list = ref<ReplyMo[]>([]);
const emit = defineEmits(["select"]);
const getList = async () => {
  try {
    const res = await reqReplyList({
      Page: 1,
      PageSize: 199
    });
    list.value = res.data.List;
  } catch (error) {
    console.log(error);
  }
};

const handleClickReply = (str: string) => {
  emit("select", str);
};
onMounted(() => {
  getList();
});
</script>
